<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>

</body>

<script>
	//构造函数模式
	function Person(name,age,job) {
		this.name = name;
		this.age = age;
		this.job = job;
		this.sayName = sayName;
	}

	function sayName(){
		alert(this.name);
	}
	var person11 = new Person('Hongwei',34,'Software1');
	var person22 = new Person('Haofei',28,'Software2');
</script>
</html>